An agent skill that stops coding agents from polishing a task forever.
Left alone, an agent will run a fourth review round "to be safe", tidy the files next to the change, turn a reviewer's nice-to-have into new work, and estimate "9–11 days" for something parallel agents finish in an afternoon. depth-lock makes it agree on the depth first and then hold it.
Before building, the agent writes a scope lock into the task journal or plan:
## Scope lock
Goal: <one user-visible sentence>
Acceptance: <testable bullets>
In scope: <items>
Non-goals: <explicit list, including tempting refactors>
Blockers: duplicate action, lost data, stuck state with no recovery, security hole, broken production path
Review caps: plan ≤ 2 rounds, code ≤ 2 rounds; rounds after the first report blockers only
Checkpoints (UTC): plan HH:MM · build HH:MM · gate HH:MM · ship HH:MM
Follow-ups: <journal section, issue tracker or spawned tasks>
While working, the agent:
- sorts every review finding into
blocking,deferredorapproved-expansion, and only blockers and approved expansions get worked on; - stops at two review rounds; blockers found in the last round get fixed test-first and checked in the gate, with no third round;
- cuts non-safety scope when a checkpoint slips and says what it cut;
- writes everything out of scope down as a follow-up (what, where, why, next step) instead of fixing it now or dropping it.
The close-out lists what was delivered against the acceptance list, what was cut, and where the follow-ups went.
The full rules are in SKILL.md.
Claude Code:
git clone https://github.com/malakhov-dmitrii/depth-lock ~/.claude/skills/depth-lockCodex and other agents that read ~/.agents/skills:
git clone https://github.com/malakhov-dmitrii/depth-lock ~/.agents/skills/depth-lockThe skill triggers on plans, features, fix trains and multi-agent workflows, on review loops that keep repeating, and on phrases like "stop polishing" or "timebox".
To apply the rule to every task, add this to your global CLAUDE.md or AGENTS.md:
## Depth lock and delivery cadence
- Every non-trivial plan states the approved depth, included cleanup, non-goals and deferred hardening. Approval locks that depth.
- Before building, write the scope lock (goal, acceptance, in scope, non-goals, blockers, review caps, checkpoints) into the task journal. The `depth-lock` skill holds the procedure.
- Review caps: at most two rounds on a plan and two on code. After the first round, reviews report blockers only.
- Out-of-scope findings go to follow-ups. Never fold them into the current work without operator approval.
- When a checkpoint slips, cut non-safety scope and say what was cut. Estimate in agent time, not human-team days.MIT