Scriptonia/blog
DocsGet Scriptonia
← All posts
PRACTICE2026-07-04 · 4 min read

How to stop your coding agent from over-building

Coding agents over-build because prompts state the goal but not the boundary. The fix is structural, not better prompting: give the agent a plan with an explicit Non-goals fence, cited acceptance criteria, and a hard gate on anything that contradicts a prior decision.

Give a strong coding agent a thin instruction and it fills the silence with initiative: “add CSV export” arrives with a scheduling system; “fix the login bug” arrives with a refactor of your session layer. None of it was asked for. All of it must now be reviewed.

Why agents over-build

Three reasons, all structural. The prompt states the goal but not the boundary. The agent can't see what customers didn't ask for. And nothing tells it which adjacent “improvements” your team already decided against — so it re-litigates settled questions in code.

The three mechanisms that fix it

  • 1. A Non-goals fence. The plan enumerates the tempting adjacencies and forbids them by name. Not “keep it minimal” — “do not build date-range, action-type, or resource filters.”
  • 2. Cited acceptance criteria. Every criterion traces to a customer quote. If a feature has no source id, it doesn't go in the plan — the strongest possible prior against invented scope.
  • 3. Contradiction gates. Work that would reverse a recorded decision is blocked with an ⚠ UNRESOLVED marker until a human explicitly approves the override in a comment.

Wire it into the agent, not the human

The mechanisms only work if the agent reads them before acting. That's what AGENTS.md is for — the instruction file Claude Code, Codex, Cursor, and OpenClaw all load automatically. scriptonia init writes the contract into it once: execute PLAN.md exactly, respect Non-goals, stop on UNRESOLVED, cite sources in the PR. After that, the discipline is ambient — no one has to remember to paste it.

The one-line takeaway

Scope is data, not vibes. Put the boundary in a file the agent must read, derive it from what customers actually said, and gate it on what your team already decided. The agent stops over-building the day the boundary stops living in your head.

Frequently asked questions

Isn't over-building just a prompting problem?

Partly — but prompts are written fresh each time and forget. A generated plan pulls the boundary from persistent memory: what customers asked for (and didn't), plus decisions that scope the work. Structure beats vigilance.

What's a contradiction gate?

A constraint in the plan that conflicts with a recorded team decision. It renders as ⚠ UNRESOLVED, the agent is instructed to stop, and only a human comment flips it to RESOLVED — with the approval recorded.

Does this slow the agent down?

It adds ~15 seconds of plan generation and a one-minute human read. It removes the multi-hour re-review cycle that follows an over-built PR — in practice the loop gets faster.

Try the loop on your own repo

One command, free tier, sample data included. Issue in, PLAN.md out.

npx scriptonia login