SEO Pipeline · Behind the scenes

Coding With an AI Agent: My Ground Rules

Six rules for coding with an AI agent: reuse, switch off with no change, green light, one commit per unit, flag what is degraded, written memory SEO PIPELINE My ground rules Reusebefore reinventingSwitch offwith no changeGreen lightnothing without approvalOne commitper validated unitFlagwhat is degradedMemorywritten, session to sessionGive the frame, keep the decision.

An AI coding agent is an assistant that writes, modifies and tests code at your request. I spent months coding with an AI agent to build a pipeline of several hundred scripts. What made the difference wasn’t the model, but the rules. Here they are, as they emerged along the way, while trying to build an SEO pipeline alone with an AI agent.

Brilliant executor, lazy strategist

It all starts from one observation: AI is a brilliant executor and a lazy strategist. Give it the frame, and it writes and scales remarkably well. Let it find the frame, and it picks the most ordinary answer.

An AI agent writes fast, a lot, and often well. But it has no natural memory of the project, no overall vision, and a marked tendency to want to get things done right away, even if it means taking shortcuts. My rules all serve the same idea: I keep the frame and the decisions, the agent executes.

The rules

Reuse before reinventing

Left to itself, an AI agent prefers to write something new. It’s faster for it than looking for what already exists. The result, over time: three functions that do almost the same thing, each with its own flaws.

The rule: before writing anything, the agent names the solution that already works in the project, and starts from it. If there isn’t one, it says so. This simple step avoided a lot of duplicates, and above all fixes made in one place but forgotten elsewhere.

Every new feature switches off with no change

Every function added to the pipeline has a switch. And when the switch is off, the result is identical to the original, byte for byte.

This rule seems strict. Above all, it’s practical: it lets you compare before and after with complete certainty. If the result changes when the new feature is off, it touched something other than what it was supposed to. You see it immediately, without waiting for a client to notice.

Nothing changes without an explicit green light

An AI agent is enthusiastic. When you discuss an idea with it, it often wants to implement it on the spot. But a design discussion is not an authorization.

The rule: the agent proposes, I approve, and only then does it make changes. It’s the same discipline as in a well-run human team, where nobody pushes a significant change without review.

One commit per validated unit

Each validated change gets its own commit, meaning a distinct record in the project’s history. The agent makes the commit; I’m the one who publishes.

This fine-grained split makes every change readable, and above all reversible. When something breaks, you know exactly what to undo, without taking three other working changes down with it.

Flag what is degraded loudly

An AI agent likes things to work. Faced with a problem, it tends to work around it quietly so everything stays green. That’s exactly what you shouldn’t do.

One of my tools announced near-total success; on checking, almost nothing had actually been enriched. Since then, the rule is clear: a step that half worked finishes as “degraded,” never green, and it says what’s missing.

Check, even when everyone agrees

One day, I asked three different AIs to review my code. All three flagged the same top-priority “bug,” with convincing explanations. Once checked in the code, that bug didn’t exist.

Three matching opinions aren’t worth one check. An AI that states something confidently is no more right than one that hesitates. Test, don’t assume.

The project memory

An AI agent doesn’t remember yesterday’s session. Every new conversation starts almost from scratch. On a project lasting several months, that’s the main risk: repeating the same mistakes, rehashing the same decisions, forgetting why a choice was made.

The solution is a written project memory. Decisions, incidents and above all their reasons are recorded in it, so the next session starts from what is already known. An incident becomes a rule there; a rule keeps its history there. That’s what keeps a months-long project consistent from one session to the next.

Give the frame, keep the decision

Since 2023, I’ve been teaching courses on AI, automation, SEO and GEO at the Institut des communications graphiques et de l’imprimabilité. To anyone starting to work with an AI agent, I’d sum up this article in one sentence: give the frame, keep the decision.

The agent will save you a considerable amount of time. But the overall vision, the priorities and the responsibility for the result remain yours.

These rules have a very concrete extension: the budget. A well-run AI project also knows how to keep API costs under control.

Go further

These rules made it possible to build a complete method, from listening to the market all the way to monthly measurement. To see what it can do for your market, discover the AI SEO pipeline.

Share this article