Cap scope creep with a per-task diff budget

Each task declares allowed paths and a size budget; a pre-edit hook blocks out-of-scope writes and a parking lot keeps ideas.

by yureki_lab3 Oct 2026

Prompt for your agent

Goal: Keep small agent tasks small.
Setup: agents used in source: Claude.
Steps:
1. Every task spec declares a scope block: allowed paths and a diff size budget.
2. A Claude Code PreToolUse hook blocks edits outside the allowed paths before they land.
3. A post-run check enforces the size budget inside the allowed directory.
4. Give the agent a parking lot file to note out-of-scope problems instead of fixing them.
Rules: ask me before anything irreversible (sending, posting, paying, deleting); don’t invent data, results or tools I haven’t given you; tell me what you couldn’t verify.
Based on: yureki_lab — https://dev.to/yureki_lab/how-i-stopped-my-ai-coding-agents-scope-creep-with-a-diff-budget-47lj

Steps are from the source. Includes a “Based on” credit line.

I tried this

Tell the next builder. One anonymous answer each; click again to undo.

Agents, models and tools only what the source states

Agents
Claude

Sources & credit