How to Manage Your Robot
How to Manage Your Robot
Working Effectively with Coding Agents
23 Jul, 2026
As the maintainer of Luxury Yacht, I spend a lot of time talking to coding agents. A lot.
I enjoy building the app, but I wouldn't say conversations with agents are fun. Keeping the robots in line is a full-time job. Waiting a long time between prompts, making sure they don't do stupid things, ensuring that the code they spit out isn't garbage... it can be tedious.
No matter how much 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 your carefully-designed, critical instructions are eventually going to get dropped from the context window to make room for who-knows-what. And that gets more likely the longer a session goes on.
Frontier agents have gotten better at retaining context after compaction, and agent memory helps some, but it's not perfect, and agents can still easily lose their way on complex tasks.
With all that in mind, I'd like to share some of the things I've done to help the agents to be more effective. I'm not pretending to be an expert here. This is knowledge won mostly through 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
Let's just get this out of the way: for large, complex projects, you'll be wrangling the agents frequently. Keeping them on track can be difficult and requires vigilance. Agents 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 think holistically, and cleaning up unintended consequences. "You made a change in the widgets subsystem that broke the gizmos module. Go fix that, and update the docs to ensure you don't do that again."
The real promise of the AI era? We're all managers now, guiding a bunch of smart but impulsive and forgetful junior engineers. So let's get into some strategies you can use to ease some of that newfound managerial burden.
Agents Files: Lay Down the Law
An agents file is a markdown file named AGENTS.md that usually sits in the root of the repo or project. Agents files are the first place an agent looks for the lay of the land, so this is where you want to put your important rules about how you want the agent to behave, and tell it where it can find more information.
A very simple agents file would look something like this:
Rules
• Always practice red/green TDD. • Run a linter on all code changes. • A task is not complete until documentation is updated. • Reuse code where possible. Don't invent new patterns when you could use something that already exists.
The agent won't always follow these instructions, and sometimes it'll forget the very important things you put in here, even if you scream in bold, uppercase letters THIS IS VERY IMPORTANT! but it's where to start.
If you take nothing else from this article, create an AGENTS.md file in your project.
What your agents file should contain depends on your project and your desires when working with agents. I can't tell you what you should have in yours. You might have luck just asking your agent to create an agents file. Or, see some examples here.
Claude has to be different
Unfortunately, Claude doesn't want an AGENTS.md file, it wants CLAUDE.md. If you only use Claude, you'll create a CLAUDE.md file 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
This tells Claude to look in AGENTS.md, so you don't have to repeat the same instructions in both files.
Using multiple agents files
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 defines 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.
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: Help the Agent Understand
My agents files contain info about where to find documentation for the app. Let the agents write their own documentation. Tell them that they are writing it for themselves, so while it needs to be human-readable, it doesn't need to be human-friendly, but instead 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 to do this are, of course, in AGENTS.md, 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 agents 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 docs, the agent is responsible for updating this top-level README any time it makes changes that would impact it.
Skills: Tell the Agent How to Do It
Skills are bundles of instructions (a markdown file, and possibly other scripts and reference files) that tell an LLM how you want it to perform a specific task. It's a broad topic that I'm not going to go too deep on in this article. There are a wealth of existing resources for skills, far more comprehensive than I could hope to be here.
If you find you're frequently repeating yourself when giving instructions to the agent, that's a sign that you might need a skill. You can try writing one yourself, but it's probably easier to ask the agent to write the skill (which you, of course, review and validate).
For example, in Luxury Yacht, I have a skill that gives the agent information about how to make changes to the refresh subsystem, the part of the app that makes sure the Kubernetes data being displayed is fresh. This is a complex system, so it's important to give the agent as much help as possible when it has to interact with the refresh system.
You might have noticed that there's some crossover between skills and docs. The way I think about it is that the docs are the what and the why, and the skills are the how.
Tests and Linters: The Safety Gates
A very effective step you should take early on is to enforce tests and linters. Never allow the agent to consider a task to be complete until it has written tests and run a linter.
I find Red/Green TDD (or Red/Green/Refactor) to be particularly effective for LLMs, as it makes them think a little harder about how to properly implement something. If you're unfamiliar with Red/Green tests, it boils down to this:
Red step - write a test that describes what you want. Verify that the test fails.
Green step - write the simplest code to make the test pass.
Refactor - improve the code while ensuring the test keeps passing.
After the tests, you should make sure the LLM runs a linter on the code it generated to catch the easy things that a linter is for. Good tests and a good linter will save you a lot of trouble.
Git: The Escape Hatch
Make sure you're w…