Agents are strong at building something in one pass and weak at changing it later. The SlopCodeBench study tested 15 coding agents on 36 problems where they had to keep extending their own code over 196 checkpoints. None solved a problem end to end; the best passed 14.8% of checkpoints, and the code got more tangled in 77% of runs. A good coding agent workflow is built around that fact: put the effort into the first shot, and restart rather than patch.
Here's the reality. I've built, scaled, and sold three companies, generated over $85 million in the last seven years in my own companies. Each of them scaled because the foundation was decided by people before the work was handed out. Agents are the same, as the research and Carlos's own experience below show.
| Evidence | Source |
|---|---|
| Best agent passed 14.8% of 196 checkpoints; no end-to-end solves | SlopCodeBench, arXiv 2603.24755 |
| Code erosion rose in 77% of runs, verbosity in 75.5% | Same |
| Agent code 2.3x more verbose and 2.0x more eroded than 473 human repositories | Same |
| Without scaffolding, a month or two of brute force kept hitting walls; with it, agents built his compilers "exactly" as needed | Carlos Kelkboom |
Before anything else, decide what this is. A learning exercise? A quick experiment? Or something you'll ship and maintain? If it's an experiment, don't over-invest: let the agent run, and throw the result away if it fails. If you're going to live with it, the next steps are worth the time.
Get the spec clear: who it's for and what it must do. Then decide the architecture and how it will run. His examples: will it deploy to a cloud host or run locally, and will data live in object storage, Postgres or SQLite? These are choices he says you shouldn't hand to the agent. Write them down in a short spec file at the top of the project.
This is the heart of the method. By hand, he:
It takes him 20 minutes to an hour. Without it, he says, agents brute-force a solution and forget how it fits the rest of the app, which leads to duplicated code and giant do-everything files. He admits he scaffolds deeper than most people need to; start with folders, notes and data shapes.
The first agent he talks to never edits code or changes his machine. Its only jobs are to discuss, ask questions, teach him and learn from him. He made the switch after asking an agent for its opinion on an idea and getting an offer to build it into his project. A talk-only agent stays focused on understanding the request. When the work is clear, it starts sub-agents to do the building.
Agents forget between sessions, and stuffing everything into context makes them worse and more expensive. His fix works like a social network: small markdown notes are the nodes, each with a one-line summary and a pointer to more detail (a file path, a commit or a web link). Search over the notes' headers finds candidates, the agent ranks what fits, checks with him, and only then goes deeper. He has the agent read recent changes (the diff) before the full code, to warm it up. He deliberately keeps this as plain files rather than a database.
He uses a small model to score how well the main agent understands the request. Only above 90% does the agent ask permission to start sub-agents.
Because agents build better in one pass, he gives sub-agents the largest chunk of work he can, sometimes running for hours. Every run happens in a Git worktree: a separate working copy of the repo on its own branch, so nothing touches the main code until he chooses. For important work, he sometimes runs three agents in three worktrees and asks a fourth to compare them and merge only the best parts.
He doesn't wait for a twelve-hour run to finish. After an hour or two he pauses, opens the worktree and looks. If the things he expected aren't immediately visible, it goes. "If I don't understand it, I throw it away." His reasoning: if he can't recognize it, it has left the scaffold, and merging it will cause trouble later.
He closes that agent, opens a fresh context, and tells the talk-only agent what went wrong. Together they find the cause, usually two ideas that clash somewhere in the scaffold or the notes. He fixes that and runs again. In his experience, the second run usually works, occasionally the third.
Language models give different answers each time. Whenever a problem repeats, he moves it into something that always behaves the same: a script that does exactly the job, or a firmer scaffold.
Big agent changes are hard to review, so he asks agents to write less code and keep features small. He's wary of unit tests on their own, because they are easy to fake. Mutation testing goes a level deeper: a tool plants small bugs in the code and checks that the tests fail. If tests still pass, they aren't really testing anything. It's slow and heavy to run, so save it for important code. He also suggests checking how much of your original scaffold is still standing, and how each commit moved the work forward.
Here's how we'd apply this coding agent workflow to a common agency job: generating 40 service-area pages for a plumbing client from a spreadsheet.
SPEC.md.data/, templates/, pages/, checks/, each with a README. A type for the page: slug, city, services[], intro, schema. One finished example page written by hand.notes/brand-voice.md, notes/client-facts.md, notes/past-mistakes.md (for instance, "don't invent license numbers"), each with a one-line summary.scaffold-check script confirms the folders, files and data type survived the run.Result: the human time goes into the spec, the scaffold and the checks, not into patching 40 pages one by one.
We use this workflow for client automations and page changes at scale: spec, scaffold, worktrees, early checks and human sign-off. You approve the spec and every release, so there's no risk of agent code shipping unseen. Why now: the sooner the scaffold exists, the cheaper every later change is.
| What we do | Where |
|---|---|
| Automations built with this workflow: spec, scaffold, checks, human sign-off | AI automation |
| Template and page changes at scale, built in branches and validated before release | Technical SEO |
One free, MIT-licensed skill for Claude, Codex and Grok comes with this guide: Scaffold Check (records your hand-made scaffold; after an agent run, measures how much of it is still standing and flags new folders, giant files and duplicated functions, then says keep, look closely or throw it away; checks and searches your context notes summary first; and only clears the build once the main agent restates at least 90% of your must-haves). Download the skill (free zip)
Giving an agent small summaries first and letting it pull in more detail only as needed, instead of loading everything at once. Kelkboom does it with linked markdown notes.
He spends 20 minutes to an hour. For most projects, folders, a note per folder, data shapes and one example are enough.
You need some way to keep each agent run separate from your main code. Worktrees make it easy to run several attempts side by side and throw away the bad ones.
After two or three restarts, look for clashing instructions in your spec, scaffold or notes. That's usually the cause.
The ideas apply to any agent build, from scripts to page templates. Someone on the team does need to read code well enough to recognize when it has left the scaffold.
Book a call and we'll scope one workflow your team could hand to agents with a scaffold and checks.
Book a Search Strategy Call