4 min read
Claude Code writes the code. The map of the environment stays with you
A one-line change left this site showing an old copy of itself for hours, and the code was correct. What was missing was a map of the environment, and you can learn to ask the AI for it.
In August this site spent a few hours showing two old articles, in Portuguese, instead of all of them. The cause was a one-line change. I had asked Claude Code to correct the name of the database in a configuration file, and it did so in seconds, without a single error.
What neither of us checked was how the hosting platform reads that file.
What actually happened?
The site runs on Render, a platform that lets you describe your whole infrastructure in one file, which it calls a Blueprint. The server, the database and the settings are written down as text, and the platform brings what exists into line with what the file says. In my case, a new name for the database was read as a new database. The platform created an empty one, pointed the site at it, and the site started serving the content of an old backup.
The original database was untouched the whole time. Getting the site back meant pasting its address into the service configuration again. Knowing that this was what was missing took understanding how the pieces connect. (The backup did its job, which is exactly why the mistake took a while to spot: the site stayed up, just poorer.)
What has AI made easy?
Almost everything that gets typed. I started programming in Python in February this year, and today this site has an application programming interface (API) through which an agent publishes drafts, an assistant that answers questions about what is published here, and a publishing process in two languages. With Claude Code, one person built that in eight months. The gain is real, and anyone with the patience to read what the AI writes can now build things that needed a team two years ago.
What the AI writes so quickly, though, runs inside an environment it only knows through what you tell it.
What is the map of the environment?
It means knowing four things, at any moment, about the system you are changing:
- Where the data lives. ROMEO, the assistant on this site, has its own database, separate from the site's, and each has its own address.
- What each change touches. In a configuration file, a name can be just a name, or it can be the identity of a whole resource.
- What happens when something fails. The server's disk is temporary and is wiped with every new version of the site, so some commands only ever run on my laptop and never on the server's console.
- Who can reach what. The interface the agent publishes through can only create drafts, and the assistant reads the site with a key that can only read. It is the principle of least privilege, which I explain at more length in Why does the model need this data?
None of these four things is written in code. They are decisions about the place the code will run in, and that is where a small mistake gets expensive.
What should you ask the AI before you touch a server?
You do not need to be a programmer to hold this map. You need to ask for it. Before any change that touches a server, a database or credentials, ask three questions:
- What else does this change affect?
- What is the worst thing that could happen?
- How do I undo it?
The AI answers all three well. It rarely asks them on its own.
Then keep the answers that matter in a file the AI reads every time it starts work. In Claude Code that file is called CLAUDE.md, and it is where this site keeps rules such as "this command never runs on the server's console". The map stops living only in your head. An honest note: Anthropic itself says CLAUDE.md works as context rather than as an enforced rule. To block an action outright there are hooks, small programs that run before each action and can stop it.
What is the question you wish you had asked before a change went wrong?